package com.xsir.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xsir.entity.Permission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xsir
 * @date 2020/11/2
 */
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {
    /**
     * 查找角色拥有的权限
     * @param role   角色
     * @return       该角色拥有的权限
     */
    List<String> getPermissions(@Param("role") String role);
}
